package com.thinqq.web.client.content.painter;

import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.VerticalPanel;

public class MainMenuCommand implements Command {
	private IContentPainter painter;
	private HorizontalPanel mainContent;
	private VerticalPanel relatedContent;

	public MainMenuCommand(IContentPainter painter,
			HorizontalPanel mainContent, VerticalPanel relatedContent) {
		super();
		this.painter = painter;
		this.mainContent = mainContent;
		this.relatedContent = relatedContent;
	}

	@Override
	public void execute() {
		if (painter == null) {
			painter = new InformationTechnologyContentPainter();
		}
		if (mainContent != null && relatedContent!=null) {
			painter.updateConent(mainContent,relatedContent);
		}
	}

}
